<?php
require_once('Mobile_Detect.php');
require_once('utils.php');
$detect = new Mobile_Detect();
//header('refresh: 600, url=/');
if ($detect->isTablet() || (preg_match('/(xoom)/i', $_SERVER['HTTP_USER_AGENT']))) {
	if ($detect->isAndroidOS()){
		// do something for android tablets	
	}
	header('Location: tablet.php');
}
else if ($detect->isMobile()) {
	if ($detect->isAndroidOS()) {
		// do something for android mobile
	}
	header('Location: mobile.php');
}

?>
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title><?php echo($lang->home->title) ?></title>
    <meta name="description" content="<?php echo($lang->home->description) ?>" />
	<meta property="fb:app_id" content="<?php echo($lang->home->fbapp_id) ?>" /> 
	<meta property="og:type" content="website" /> 
	<meta property="og:title" content="<?php echo($lang->home->ogtitle) ?>" /> 
	<meta property="og:image" content="<?php echo(hostname().$lang->home->ogimage) ?>" /> 
	<meta property="og:description" content="<?php echo($lang->home->ogdescription) ?>" /> 
	<meta property="og:url" content="<?php echo(full_url()) ?>">
	
    <meta name="viewport" content="width=device-width" />
    <link rel="stylesheet" href="css/fonts/fonts.css" />
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" href="css/site.css" />

    <!-- <NAVAGIS> -->
    <link rel="stylesheet" href="css/custom-theme/jquery-ui-1.8.18.custom.css" />
    <!-- </NAVAGIS> -->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script type="text/javascript" src="demos/demos.php"></script>
 

	<!-- <NAVAGIS> -->
    <script src="js/autoshim.js"></script>
    <script src="js/switch_demo.js"></script>
    <script src="demos/financial1/js/demo.js"></script>
    <script src="demos/government1/js/demo.js"></script>
    <script src="demos/government2/js/demo.js"></script>
    <script src="demos/resource1/js/demo.js"></script>
    <script src="demos/resource2/js/demo.js"></script>
    <script src="demos/telco1/js/demo.js"></script>
    <script src="demos/telco2/js/demo.js"></script>
    <script src="demos/utilities1/js/demo.js"></script>
    <script src="demos/utilities2/js/demo.js"></script>
    <!-- </NAVAGIS> -->

    <script src="js/libs/modernizr-2.5.3.min.js"></script>
	<noscript>
		<style>
			.main-info div {display:block;}
			.verticals, .grid {display:block;}
		</style>
	</noscript>
</head>
<body class="<?php echo(getBrowser()); ?> <?php echo (isset($_SESSION['lang']) ? $_SESSION['lang'] : "") ?>" data-title="home">
    <header>
		<h1><a href="./"><?php echo($lang->home->header->h1) ?></a></h1>
		<?php echo($lang->home->header->getintouch) ?>
		<div id="languageContainer">
			<?php buildLanguageSelect(); ?>
		</div>
		<div class="divider"></div>
		<?php 
			if (isset($_SESSION['lang'])) {
				printf('<input type="hidden" id="hdnLang" value="%s" />', $_SESSION['lang']);
			}
		?>
    </header>
    <div role="main">
	<div class="map-bg-holder" id="map-bg-holder">
		<div class="map-bg" id="map-bg">
			<div class="map-holder">
				<div class="map-corners">
					<div class="tl"></div><div class="tr"></div><div class="bl"></div><div class="br"></div>			
					<div id="map"></div>
					<div class="grid"></div>
					<div class="verticals">
						<div class="main-info">
							<div class="default"><img src="img/map.png" style="padding-bottom:20px;" /><?php echo($lang->home->defaultinfo->copy) ?></div>						
							<div class="telco"><img src="img/icons/telco.png" /><h2><?php echo($lang->home->telcoinfo->h2) ?></h2><?php echo($lang->home->telcoinfo->copy) ?></div>
							<div class="utilities"><img src="img/icons/utilities.png" /><h2><?php echo($lang->home->utilitiesinfo->h2) ?></h2><?php echo($lang->home->utilitiesinfo->copy) ?></div>
							<div class="resource"><img src="img/icons/resource.png" /><h2><?php echo($lang->home->resourceinfo->h2) ?></h2><?php echo($lang->home->resourceinfo->copy) ?></div>
							<div class="government"><img src="img/icons/government.png" /><h2><?php echo($lang->home->governmentinfo->h2) ?></h2><?php echo($lang->home->governmentinfo->copy) ?></div>
							<div class="financial"><img src="img/icons/financial.png" /><h2><?php echo($lang->home->financialinfo->h2) ?></h2><?php echo($lang->home->financialinfo->copy) ?></div>
						</div>
						<div id="tiles"></div>
						<div class="controls"><div class="road"></div><div class="satellite satelliteon"></div></div>
					</div>
					<div id="demoholder"></div>
					<iframe src="about:blank" frameborder="0" class="earthshim"></iframe>
					<div id="earth"></div>
				</div>
			</div>
		</div>
			<div class="map-bottom-shadow"></div>	
		</div>		
    </div>
    <footer>
		<div class="divider"></div>		
		<div class="social">
			
			<!-- AddThis Button BEGIN -->
			<div class="addthis_toolbox addthis_default_style addthis_20x20_style">
			<a class="addthis_button_email" addthis:title="<?php echo($lang->sharing->facebook->title) ?>" addthis:description="<?php echo($lang->sharing->facebook->description) ?>" addthis:url="http://discovermapsforbusiness.com" addthis:email_template="discovermapsforbusiness"><img src="img/email.png" /></a>
			<a class="addthis_button_twitter" addthis:title="<?php echo($lang->sharing->twitter) ?>" addthis:url="http://discovermapsforbusiness.com"><img src="img/twitter.png"/></a>
			</div>
			<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e5affd91537e09b"></script>
			<!-- AddThis Button END -->
			<div class="plusone" id="plusone">
				<div class="g-plusone" data-size="medium" data-href="<?php $_SERVER["DOCUMENT_ROOT"] ?>"></div>

				<!-- Place this render call where appropriate -->
				<script type="text/javascript">
				  (function() {
					var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
					po.src = 'https://apis.google.com/js/plusone.js';
					var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
				  })();
				</script>
			</div>
		</div>
		<div class="links">
			<a href="http://google.com/enterprise/maps" target="_blank" id="hlEAME"><?php echo($lang->home->footer->googleEAME) ?></a>&nbsp;&nbsp;&nbsp;
			<a href="http://www.google.com/intl/en/privacy.html" target="_blank" id="hlPrivacy"><?php echo($lang->home->footer->googleprivacy) ?></a>&nbsp;&nbsp;&nbsp;
			<a href="http://www.google.com/intl/en/permissions/geoguidelines.html" target="_blank" id="hlGuidelines"><?php echo($lang->home->footer->acceptableuse) ?></a>
			<br />Built by <a href="http://www.navagis.com">Navagis</a>, Created by <a href="http://www.sputnikagency.com">Sputnik</a>
		</div>
		<a href="<?php $_SERVER["DOCUMENT_ROOT"] ?>/" class="logo"><img src="img/google-logo.png" alt="<?php echo($lang->home->footer->googlelogoalt) ?>" /></a>
    </footer>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
    <script>        window.jQuery || (document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>') && document.write('<script src="js/libs/jquery-ui-1.8.18.custom.min.js"><\/script>'))</script>
    <script src="js/libs/raphael-min.js"></script>
    <script src="//www.google.com/jsapi"></script>
    <script src="js/plugins.js"></script>
	<script src="js/script.js"></script>
	<?php include_once($_SERVER['DOCUMENT_ROOT'].'/includes/ga.php') ?>
  	<script src="js/analytics.js"></script>
</body>
</html>


